import service from '@/utils/request'
// import qs from 'qs'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service
const request = {
    /**年度计划基本页面修改 */
    turnoverAnnualDemandPlanUpdate (params) {
        return httpPost({
            url: '/turnover/annualDemandPlan/update',
            params
        })
    },
    /**年度计划基本页面查询 */
    turnoverAnnualDemandPlanFindById (billId) {
        return httpGet({
            url: '/turnover/annualDemandPlan/findById',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**年度计划增删改 */
    turnoverAnnualDemandPlanUpdateDtlList (params) {
        return httpPost({
            url: '/turnover/annualDemandPlan/updateDtlList',
            params
        })
    },
    //查询年计划明细
    turnoverAnnualDemandPlanFindByBillId (billId) {
        return httpGet({
            url: '/turnover/annualDemandPlan/findByBillId',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })

    },
    //查询年计划明细 -- 集采汇总情况查看
    turnoverAnnualDemandPlanGetSummarySituation (dtlId) {
        return httpGet({
            url: '/turnover/annualDemandPlan/getSummarySituation',
            params: {
                dtlId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })

    },
    /**年度计划明细历史新增 */
    turnoverAnnualDemandPlanCreateHistory (params, billType) {
        return httpPost({
            url: `/turnover/audit/createHistory/${billType}`,
            params
        })
    },
    /**年度计划明细修改历史查询 */
    turnoverDtlHistoryGetHistoryList (dtlId, updateColumn, billType
    ) {
        return httpPost({
            url: '/turnover/dtlHistory/getHistoryList',
            params: {
                updateColumn,
                dtlId,
                billType
            }
        })

    },

    /**年计划变更基本信息新增 */
    turnoverAnnualDemandPlanChangedUpdate (params) {
        return httpPost({
            url: '/turnover/annualDemandPlanChanged/update',
            params
        })
    },
    /**年度计划变更基本页面查询 */
    turnoverAnnualDemandPlanChangedFindById (billId) {
        return httpGet({
            url: '/turnover/annualDemandPlanChanged/findById',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**年度计划变更基本页面查询 */
    turnoverAnnualDemandPlanChangedInitData (billId) {
        return httpGet({
            url: '/turnover/annualDemandPlanChanged/initData',
            params: {
                planId: billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**年度计划变更明细查找 */
    turnoverAnnualDemandPlanChangedFindByBillId (billId) {
        return httpGet({
            url: '/turnover/annualDemandPlanChanged/findByBillId',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**年计划变更明细 增删改 */
    turnoverAnnualDemandPlanChangedUpdateDtlLsit (params) {
        return httpPost({
            url: '/turnover/annualDemandPlanChanged/updateDtlLsit',
            params
        })
    },

    /******************************************  集采汇总  ***************************************************** */
    /**采集汇总--修改基本信息 */
    turnoverCentralizedPurchaseSummaryUpdate (params) {
        return httpPost({
            url: '/turnover/centralizedPurchaseSummary/update',
            params
        })
    },
    /**采集汇总--获取页面基本信息 */
    turnoverCentralizedPurchaseSummaryFindById (billId) {
        return httpGet({
            url: '/turnover/centralizedPurchaseSummary/findById',
            params: {
                billId: billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })

    },
    /**采集汇总--删除单据 */
    turnoverCentralizedPurchaseSummaryDelete (billId) {
        return httpGet({
            url: '/turnover/centralizedPurchaseSummary/delete',
            params: {
                billId: billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })

    },
    /**采集汇总--根据申报单位ids查询明细 */
    turnoverCentralizedPurchaseSummaryGetAgencyListByOrgId (ids) {
        return httpPost({
            url: '/turnover/centralizedPurchaseSummary/getAgencyListByOrgId',
            params:
                ids
            ,
        })
    },
    /**采集汇总--查询最子级所有明细 */
    centralizedPurchaseSummaryGetAgencyDtlList (params) {
        return httpPost({
            url: '/turnover/centralizedPurchaseSummary/getAgencyDtlList',
            params
        })
    },
    /**采集汇总--根据申年度计划ID查询物资明细(查询所有明细) */
    turnoverCentralizedPurchaseSummaryGetAllMaterial (params) {
        return httpPost({
            url: '/turnover/centralizedPurchaseSummary/getAllMaterial',
            params
        })

    },
    /**采集汇总-- 更新申报机构及周材明细信息 */
    turnoverCentralizedPurchaseSummaryUpdateDtlList (params) {
        return httpPost({
            url: '/turnover/centralizedPurchaseSummary/updateDtlList',
            params
        })

    },
    /**采集汇总-- 根据周材集采汇总id查询申报机构 */
    turnoverCentralizedPurchaseSummaryGetAgencyListByBillId (billId) {
        return httpGet({
            url: '/turnover/centralizedPurchaseSummary/getAgencyListByBillId',
            params: {
                billId
            }
        })

    },
    /**采集汇总-- 根据申报机构明细id查询物资明细（查询上次保存的明细） */
    turnoverCentralizedPurchaseSummaryGetMaterial (agencyId) {
        return httpGet({
            url: '/turnover/centralizedPurchaseSummary/getMaterial',
            params: {
                agencyId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })

    },
    /**采集汇总-- 保存物质汇总 */
    turnoverCentralizedPurchaseSummarySaveSummarySetting (params) {
        return httpPost({
            url: '/turnover/centralizedPurchaseSummary/saveSummarySetting',
            params
        })

    },
    /**采集汇总-- 查询物资汇总 */
    turnoverCentralizedPurchaseSummaryGetSummarySetting (billId) {
        return httpGet({
            url: '/turnover/centralizedPurchaseSummary/getSummarySetting',
            params: {
                billId
            },
        })

    },
    /**采集汇总-- 查询年度需用计划 */
    turnoverTemporaryDemandPlanGetAnnualDemandPlan () {
        return httpGet({
            url: '/turnover/temporaryDemandPlan/getAnnualDemandPlan',

            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })

    },

    /****************************** 临时需用计划*********************************/
    /**临时需用计划-- 更新临时需用计划明细 */
    turnoverTemporaryDemandPlanUpdateDtl (params) {
        return httpPost({
            url: '/turnover/temporaryDemandPlan/updateDtl',
            params
        })

    },
    /**临时需用计划-- 更新基本信息 */
    turnoverTemporaryDemandPlanUpdate (params) {
        return httpPost({
            url: '/turnover/temporaryDemandPlan/update',
            params
        })

    },

    /**临时需用计划-- 根据临时需求计划单据ID查询明细 */
    turnoverTemporaryDemandPlanFindDtlByBillId (billId) {
        return httpGet({
            url: '/turnover/temporaryDemandPlan/findDtlByBillId',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })

    },
    /**临时需用计划-- 根据临时需求计划单据ID查询明细 */
    turnoverTemporaryDemandPlanChangedInitChange (planId, ) {
        return httpGet({
            url: '/turnover/temporaryDemandPlanChanged/initChange',
            params: {
                planId,
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })

    },
    /**临时需用计划-- 修改临时需用计划 */
    turnoverTemporaryDemandPlanChangedUpdate (params) {
        return httpPost({
            url: '/turnover/temporaryDemandPlanChanged/update',
            params
        })
    },
    /**临时需用计划-- 更新临时需用计划变更明细 */
    turnoverTemporaryDemandPlanChangedUpdateDtl (params) {
        return httpPost({
            url: '/turnover/temporaryDemandPlanChanged/updateDtl',
            params
        })
    },

    /**临时需用计划-- 根据临时需用计划ID查询变更列表 */
    turnoverTemporaryDemandPlanFindChangeList (planId, ) {
        return httpGet({
            url: '/turnover/temporaryDemandPlan/findChangeList',
            params: {
                planId,
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })

    },
    /**临时需用计划-- 根据临时需求计划变更单据ID查询明细 */
    turnoverTemporaryDemandPlanChangedFindDtlByBillId (billId) {
        return httpGet({
            url: '/turnover/temporaryDemandPlanChanged/findDtlByBillId',
            params: {
                billId,
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })

    },
    /******************************** 采购计划 ******************************** */
    /**采购计划-- 修改明细 */
    turnoverProcurementPlanUpdateDtl (params) {
        return httpPost({
            url: '/turnover/procurementPlan/updateDtl',
            params
        })

    },
    /**采购计划-- 修改基本信息 */
    turnoverProcurementPlanUpdate (params) {
        return httpPost({
            url: '/turnover/procurementPlan/update',
            params
        })

    },

    /**采购计划-- 根据采购计划单据ID查询明细 */
    turnoverProcurementPlanFindDtlByBillId (billId) {
        return httpGet({
            url: '/turnover/procurementPlan/findDtlByBillId',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })

    },

    /**采购计划变更-- init */
    turnoverProcurementPlanChangedInitChange (planId) {
        return httpGet({
            url: '/turnover/procurementPlanChanged/initChange',
            params: {
                planId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })

    },
    /**采购计划变更-- 根据变更单据ID查询明细 */
    turnoverProcurementPlanChangedFindByBillId (billId) {
        return httpGet({
            url: '/turnover/procurementPlanChanged/findByBillId',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })

    },
    /**采购计划变更-- 修改周材采购计划变更 */
    turnoverProcurementPlanChangedUpdate (params) {
        return httpPost({
            url: '/turnover/procurementPlanChanged/update',
            params
        })
    },
    /**采购计划变更-- 更新采购计划变更明细信息 */
    turnoverProcurementPlanChangedUpdateDtlLsit (params) {
        return httpPost({
            url: '/turnover/procurementPlanChanged/updateDtlLsit',
            params
        })
    },

    /******************************** 租赁计划 ******************************** */
    /**租赁计划-- 更新基本信息 */
    turnoverLeasePlanUpdate (params) {
        return httpPost({
            url: '/turnover/leasePlan/update',
            params
        })
    },
    /**租赁计划-- 修改明细 */
    turnoverLeasePlanUpdateDtl (params) {
        return httpPost({
            url: '/turnover/leasePlan/updateDtl',
            params
        })
    },
    /**租赁计划-- 查找明细 */
    turnoverLeasePlanFindDtlByBillId (billId) {
        return httpGet({
            url: '/turnover/leasePlan/findDtlByBillId',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },

    /**租赁计划-- 保存建议租赁商 */
    turnoverLeasePlanUpdateSuggestedLessee (params) {
        return httpPost({
            url: '/turnover/leasePlan/updateSuggestedLessee',
            params
        })
    },
    /**租赁计划-- 查找明细 */
    turnoverLeasePlanGetSuggestedLessee (billId) {
        return httpGet({
            url: '/turnover/leasePlan/getSuggestedLessee',
            params: {
                billId
            },
        })
    },
    /**租赁计划变更-- 初始化变更单数据 */
    turnoverLeasePlanChangedInitData (planId) {
        return httpGet({
            url: '/turnover/leasePlanChanged/initData',
            params: {
                planId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**租赁计划变更-- 根据周材租赁计划变更id查询周材租赁计划变更完整信息 */
    turnoverLeasePlanChangedFindByBillId (billId) {
        return httpGet({
            url: '/turnover/leasePlanChanged/findByBillId',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**租赁计划变更-- 更新租赁计划变更明细信息 */
    turnoverLeasePlanChangedUpdateDtlLsit (params) {
        return httpPost({
            url: '/turnover/leasePlanChanged/updateDtlLsit',
            params
        })
    },
    /**租赁计划变更-- 修改周材租赁计划变更 */
    turnoverLeasePlanChangedUpdate (params) {
        return httpPost({
            url: '/turnover/leasePlanChanged/update',
            params
        })
    },
}

export default request
